Share File Or Folder
Description
Google Drive: Share File Or Folder step shares a file Or folder on Google Drive.
Reference:
API documentation:
- https://developers.google.com/drive/api/guides/manage-sharing
- https://developers.google.com/drive/api/reference/rest/v3/permissions/create
Configurations
No. | Field Name | Description |
---|---|---|
1 | Step name | Name of the step as it appears in the workflow workspace. This name has to be unique in a single workflow. |
Connection: | Refer Prerequisites and References above to get the connection attributes. | |
2 | Client ID | Specify Client ID of the Google project. The data type is String. This field is mandatory. |
Client Secret: | ||
3 | Accept Values from fields | Leave checkbox unchecked to accept Client Secret value from a field in the previous steps of the stream using a drop down list. Else enable checkbox for Secret Key field to appear as Text box. |
4 | Client Secret | Specify Client Secret of the Google project. Client Secret is entered using a widget. If checkbox above is enabled Client Secret field appears as Text box and accepts static values or variables. Else if checkbox above is disabled Client Secret field appears as a drop down containing values from previous steps - to select from. The data type is String. This field is mandatory. |
Refresh Token: | ||
5 | Accept Values from fields | Leave checkbox unchecked to accept Secret Key value from a field in the previous steps of the stream using a drop down list. Else enable checkbox for Secret Key field to appear as Text box. |
6 | Refresh Token | Specify a Refresh Token to obtain a new Access Token. Note: Refresh Token is entered using a widget. If checkbox above is enabled Refresh Token field appears as Text box and accepts static values or variables. Else if checkbox above is disabled Refresh Token field appears as a drop down containing values from previous steps - to select from. The data type is String. This field is mandatory. |
7 | Test Connection | Click Test Connection button to verify whether the connection is available or not. Client ID, Client Secret and Refresh Token are mandatory to authenticate Google Drive. For the purpose of verification fields coming from previous steps are not allowed since field values can only be accessed when workflow is in running state. Static values and environment variables are allowed. |
Input Fields: | ||
1 | File Or Folder ID | Specify an ID of the Google Drive file or folder for which sharing information is needed. The data type is String. This field is mandatory. Refer Table: Fetch File or Folder ID above to fetch the ID. |
2 | Get | Click to fetch and populate the files and folders available in Google Drive. The selected file’s or folder’s ID appears in the File Or Folder ID field. |
3 | Role | Specify the role of the user or group that is being granted permission. Allowed values are:owner, writer, commenter, reader. The data type is String. This field is mandatory. |
4 | Type | Specify the type of permission. Allowed values are:user, group, domain, or anyone. |
Sharing, Notification & Security Tab: | ||
1 | Email Address | Specify the email address of the user or group that is being granted the permission. |
2 | Domain | Specify the domain of the Google Workspace domain to which the permission is being granted. |
3 | Editors can Change Permission and Share | Select if editors can change the permission of the file or folder and share them. Allowed values: Yes or No. Default value: Yes. |
4 | Viewers And Commenters Can See The Option To Download Print And Copy | Select if viewers and commenters can see the option to download, print, and copy. Allowed values: Yes or No. Default value: Yes |
5 | Allow File Discovery | Specify if permission allows the file to be writable through search. Note: The field is applicable only for permission type, domain or anyone. |
6 | Transfer Ownership | Specify the name of the user account to whom you want to transfer the ownership of the file or folder. Important: Transferring ownership means giving another user or account full control and ownership rights over a particular file or folder or assets. When ownership is transferred, the previous owner has no rights over the file or folder, unless the new owner grants permission to the previous owner. Note: - This is only applicable for permissions of a Role Owner. Currently, Drive does not support changing ownership for items that are owned by gmail.com accounts; it's supported for Workspace accounts. https://issuetracker.google.com/issues/228791253 - The fields, Editors Can Change Permission And Share and Viewers And Commenters Can See The Option To Download Print And Copy can’t be changed while transferring ownership, they should be set to default or set the value =Yes |
7 | Send Mail | Select if you can send an email notification to the user or group when permission is granted. Allowed values: Yes or No. Default value: Yes. |
8 | Message | Specify custom mail messages while sharing the file or folder. It will be included in the notification email. |
9 | Remove Expiration Time | Specify whether to remove the expiration time from the shared file or folder. Allowed values: Yes or No. Default value: No. Note: The option to set an expiration date on access to a file is only available for companies and users using GSuite. Regular Google Accounts need to manage file access manually. |
10 | Expiration Time | Specify the time at which the permission will expire. The time is specified as a string in RFC 3339 format. Note: The option to set an expiration date on access to a file is only available for companies and users using GSuite. Regular Google Accounts need to manage file access manually. |
Output Field: | ||
1 | Shared Link | Specify the output variable name in the field. The default output variable name is “SharedLink”. On the successful execution, it holds the output of plugin step in web link format. |